<template>
    <BaseForm
      labelWidth="160px"
      :inline="true"
      :fromIems="fromIems"
      ref="BaseForm"
      @submit="submit"
      @edit="edit"
    ></BaseForm>
  </template>
  
  <script>
  import tableMixin from "@/mixins";
  export default {
    mixins: [tableMixin],
    components: {},
    data() {
      return {
        fromIems: [
          {
            valueType: "input",
            label: "订单号",
            dataIndex: "currencyName",
            rules: [{ required: true, message: "请输入", trigger: "blur" }],
          },
          {
            valueType: "date",
            label: "开单日期",
            dataIndex: "tme",
            rules: [{ required: true, message: "请输入", trigger: "blur" }],
          },
          {
            valueType: "select",
            label: "开单人",
            dataIndex: "a",
            options: [],
            search: true,
            searchFn: (query) => {
              console.log(query, "---");
            },
            rules: [{ required: true, message: "请输入", trigger: "blur" }],
          },
          {
            valueType: "select",
            label: "客户名称",
            dataIndex: "name",
            options: [],
            search: true,
            searchFn: (query) => {
              console.log(query, "---");
            },
            rules: [{ required: true, message: "请输入", trigger: "blur" }],
          },
          {
            valueType: "date",
            label: "交货日期",
            dataIndex: "jh",
            rules: [{ required: true, message: "请输入", trigger: "blur" }],
          },
          {
            valueType: "switch",
            label: "是否含税",
            dataIndex: "sp",
            props: {
              activeText: "是",
              inactiveText: "否",
            },
            onChange: (e) => {
              console.log(e);
            },
            rules: [{ required: true, message: "请输入", trigger: "blur" }],
          },
          {
            valueType: "inputNumber",
            label: "税点",
            dataIndex: "sd",
            hide: (data) => {
              return data.sp == true;
            },
            rules: [{ required: true, message: "请输入", trigger: "blur" }],
          },
          {
            valueType: "inputNumber",
            label: "不含税金额",
            dataIndex: "sd",
            rules: [{ required: true, message: "请输入", trigger: "blur" }],
          },
          {
            valueType: "inputNumber",
            label: "含税金额",
            dataIndex: "sd",
            rules: [{ required: true, message: "请输入", trigger: "blur" }],
          },
          {
            valueType: "inputNumber",
            label: "税金",
            dataIndex: "sd",
            rules: [{ required: true, message: "请输入", trigger: "blur" }],
          },
          {
            valueType: "inputNumber",
            label: "服务费",
            dataIndex: "sd",
            rules: [{ required: true, message: "请输入", trigger: "blur" }],
          },
          {
            valueType: "date",
            label: "起租日期",
            dataIndex: "jh",
            rules: [{ required: true, message: "请输入", trigger: "blur" }],
          },
          {
            valueType: "date",
            label: "租止日期",
            dataIndex: "jh",
            rules: [{ required: true, message: "请输入", trigger: "blur" }],
          },
          {
            valueType: "inputNumber",
            label: "运费",
            dataIndex: "sd",
            rules: [{ required: true, message: "请输入", trigger: "blur" }],
          },
          {
            valueType: "switch",
            label: "是否开发票",
            dataIndex: "sp",
            props: {
              activeText: "是",
              inactiveText: "否",
            },
            onChange: (e) => {
              console.log(e);
            },
            rules: [{ required: true, message: "请输入", trigger: "blur" }],
          },
          {
            valueType: "switch",
            label: "是否加急",
            dataIndex: "sp",
            props: {
              activeText: "是",
              inactiveText: "否",
            },
            onChange: (e) => {
              console.log(e);
            },
            rules: [{ required: true, message: "请输入", trigger: "blur" }],
          },
          {
            valueType: "input",
            label: "收货人",
            dataIndex: "currencyName",
            rules: [{ required: true, message: "请输入", trigger: "blur" }],
          },
          {
            valueType: "input",
            label: "物流公司",
            dataIndex: "currencyName",
            rules: [{ required: true, message: "请输入", trigger: "blur" }],
          },
          {
            valueType: "input",
            label: "物流单号",
            dataIndex: "currencyName",
            rules: [{ required: true, message: "请输入", trigger: "blur" }],
          },
          {
            valueType: "input",
            label: "收货电话",
            dataIndex: "currencyName",
            rules: [{ required: true, message: "请输入", trigger: "blur" }],
          },
          {
            valueType: "input",
            type: "textarea",
            label: "详细地址",
            dataIndex: "currencyName",
            rules: [{ required: true, message: "请输入", trigger: "blur" }],
          },
          {
            valueType: "input",
            label: "备注",
            dataIndex: "currencyName",
            rules: [{ required: true, message: "请输入", trigger: "blur" }],
          },
        ],
      };
    },
    methods: {
      submit() {},
      edit() {},
    },
  };
  </script>
  